<?php
function editPostForm( $post ) {
echo <<<EOE
<form action="./gulp.php" method="post" >
  <input type="hidden" name="type" value="POST" />
  <input type="hidden" name="tnum" value="${post['tid']}" />
  <input type="hidden" name="pnum" value="${post['rank']}" />
  <input type="hidden" name="unum" value="${post['uid']}" />
  
  title:
  <input type="text" name="title" value="${post['title']}" /><br />
  text:
  <textarea name="datum" rows="10" cols="30">${post['datum']}</textarea><br />
  <input type="submit" name="action[edit]" value="DOOM" />
</form>

EOE;
}

function newPostForm( $fnum, $tnum ) {
echo <<<EOE
<form action="./gulp.php" method="post" >
  <input type="hidden" name="type" value="POST" />
  <input type="hidden" name="tnum" value="$tnum" />
  <input type="hidden" name="fnum" value="$fnum" />
  
  title:
  <input type="text" name="title" value="" /><br />
  text:
  <textarea name="datum" rows="10" cols="30">Insert Text Har. Mmkays</textarea><br />
  <input type="submit" name="action[new]" value="DOOM" />
</form>

EOE;
}
?>
